package co.fitstart.admin.service;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.demo2do.core.support.Page;

import co.fitstart.admin.entity.search.TelephoneRecordSearch;
import co.fitstart.admin.entity.search.TelephoneResourceSearch;
import co.fitstart.entity.course.schedule.CourseSchedule;
import co.fitstart.entity.reference.Gender;
import co.fitstart.entity.user.TelephoneRecord;
import co.fitstart.entity.user.TelephoneResource;
import co.fitstart.entity.user.User;

/**
 * 
 * @author haiyan_xiao
 *
 */
public interface TelephoneResourceService {
    
    /**
     * 
     * @param period
     * @param day
     * @param experienced
     * @param page
     * @return
     */
    public List<TelephoneResource> list(String period, Date day, Boolean experienced, Page page);
    
    /**
     * 
     * @param period
     * @param day
     * @param experienced
     * @return
     */
    public int count(String period, Date day, Boolean experienced);
    
    /**
     * 
     * @param begin
     * @param end
     * @param experienced
     * @return
     */
    public List<TelephoneResource> list(Date begin, Date end, Boolean experienced);
    
    /**
     * 
     * @param search
     * @return
     */
    public List<TelephoneResource> search(TelephoneResourceSearch search);
    
    /**
     * 
     * @param mobile
     * @param gender
     * @param name
     * @param telephoneResource
     */
    public void create(String mobile, Gender gender, String name, TelephoneResource telephoneResource);
    
    /**
     * 
     * @param telephoneResourceId
     * @return
     */
    public TelephoneResource load(Long telephoneResourceId);
    
    /**
     * 
     * @param telephoneResource
     */
    public void update(TelephoneResource telephoneResource);
    
    /**
     * 
     * @param telephoneRecord
     */
    public void addTelephoneRecord(TelephoneRecord telephoneRecord);
    
    /**
     * 
     * 
     * @param telephoneRecordId
     * @return
     */
    public TelephoneRecord loadTelephoneRecord(Long telephoneRecordId);
    
    /**
     * 
     * @param telephoneRecord
     */
    public void updateTelephoneRecord(TelephoneRecord telephoneRecord);
    
    /**
     * 
     * @param date
     * @param period
     * @return
     */
    public Map<String, Date> getTimes(Date date, String period);
    
    /**
     * 
     * @param begin
     * @param end
     * @param experienced
     * @return
     */
    public List<User> listUser(Date begin, Date end, Boolean experienced);
    
    /**
     * 
     * @param search
     * @return
     */
    public List<User> listUser(TelephoneResourceSearch search);

    /**
     * 
     * @param users
     * @param experienced
     * @return
     */
    public Map<Long, CourseSchedule> listSchedule(List<User> users, Boolean experienced);
    
    /**
     * 
     * @param users
     * @return
     */
    public Map<Long, CourseSchedule> listSchedule(List<User> users);
    
    /**
     * 
     * @param users
     * @return
     */
    public Map<Long, Long> listRoundCount(List<User> users);
    
    /**
     * 
     * @param users
     * @return
     */
    public Map<Long, Long> listRoundPriceSum(List<User> users);
    
    /**
     * 
     * @param telephoneResources
     * @return
     */
    public Map<Long, Long> listTelephoneRecordCount(List<TelephoneResource> telephoneResources);
    
    /**
     * 
     * @param begin
     * @param end
     * @param experienced
     * @return
     */
    public Map<Long, Long> listTelephoneRecordCount(Date begin, Date end, Boolean experienced);
    
    /**
     * 
     * @param search
     * @return
     */
    public Map<Long, Long> listTelephoneRecordCount(TelephoneRecordSearch search);
}
